home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Apple Game Sprockets / RAVE SDK 1.06 GM for MacOS / Example Projects / GameScene / GSError.h < prev    next >
Encoding:
Text File  |  1996-03-18  |  1.1 KB  |  48 lines  |  [TEXT/ALFA]

  1. // ===========================================================================
  2. //    
  3. //     GSError.h
  4. //    
  5. //    Copyright (C) 1996 Apple Computer, Inc.  All rights reserved.
  6. //
  7. // ===========================================================================
  8.  
  9.  
  10. #ifndef _GSError_h
  11. #define _GSError_h
  12.  
  13.  
  14. // ===========================================================================
  15. //     Error Macros
  16. // ===========================================================================
  17.  
  18. #ifdef kGSDebug
  19.     void GSError(const char* inMessage);
  20.  
  21.     #define GSString_(x) GSPound_(x)
  22.     #define GSPound_(x) #x
  23.     
  24.     #define GSAssert_(test)                                         \
  25.         (test) ? (void) 0 :                                            \
  26.             GSError(__FILE__ " (" GSString_(__LINE__) "): " #test)
  27. #else
  28.     #define GSAssert_(test)                                                
  29. #endif
  30.  
  31.  
  32. // ===========================================================================
  33. //    Types
  34. // ===========================================================================
  35.  
  36. typedef enum TGSError {
  37.     kGSError_None,
  38.     kGSError_General,
  39.     kGSError_NotEnoughMemory,
  40.     kGSError_FileNotFound,
  41.     kGSError_FileSystem,
  42.     kGSError_RAVE,
  43.     kGSError_OS,
  44. } TGSError;
  45.  
  46.  
  47. #endif // _GSError_h
  48.